<!--  -->
<template>
  <div class="statisticsShowDataPanel">
    <date-switching-component @getData="getData"/>
    <el-table class="statisticsTableView" :expand-row-keys="expands" :row-key="getRowKeys" :data="dataList"
              @expand-change="expandColumn">
      <el-table-column type="expand">
        <template #default="props">
          <div class="tableColumnView">
            <historical-data-echarts-panel ref="DailyDosageStatisicsBar" class="echartsView"/>
            <el-table :data="props.row.dataList">
              <el-table-column label="采集时间" prop="dataTime" width="90"/>
              <el-table-column label="正向有功" align="center" width="90"
                               v-if="showColumn.activeEnergyConsumption||showColumn.activeEnergyTotal">
                <el-table-column prop="activeEnergyConsumption" v-if="showColumn.activeEnergyConsumption"
                                 label="使用量(kw/h)" align="center" width="90"/>
                <el-table-column prop="activeEnergyTotal" v-if="showColumn.activeEnergyTotal" label="累计值(kw/h)"
                                 align="center" width="90"/>
              </el-table-column>
              <el-table-column label="正向有功实际值" align="center">
                <el-table-column prop="realActiveEnergyConsumption" label="使用量(kw/h)" width="90" align="center"/>
                <el-table-column prop="realActiveEnergyTotal" label="累计值(kw/h)" width="90" align="center"/>
              </el-table-column>
              <el-table-column prop="multiplier" label="倍率" align="center" width="90"></el-table-column>
              <el-table-column prop="reverseActiveEnergy" v-if="showColumn.reverseActiveEnergy" :label="'反向有功\n(kw/h)'"
                               align="center" width="90"/>
              <el-table-column prop="inductiveReactivePower" v-if="showColumn.inductiveReactivePower"
                               :label="'感性无功\n(kvrah)'" align="center" width="90"/>
              <el-table-column prop="capacitiveReactivePower" v-if="showColumn.capacitiveReactivePower"
                               :label="'容性无功\n(kvrah)'" align="center" width="90"/>
              <el-table-column prop="ctRatio" label="CT变比" v-if="showColumn.ctRatio" align="center" width="90"/>
              <el-table-column prop="ptRatio" label="PT变比" v-if="showColumn.ptRatio" align="center" width="90"/>
              <el-table-column label="电压(V)" align="center"
                               v-if="showColumn.phaseAVoltage||showColumn.phaseBVoltage||showColumn.phaseBVoltage">
                <el-table-column prop="phaseAVoltage" v-if="showColumn.phaseAVoltage" label="A相电压" align="center" width="90"/>
                <el-table-column prop="phaseBVoltage" v-if="showColumn.phaseBVoltage" label="B相电压" align="center" width="90"/>
                <el-table-column prop="phaseCVoltage" v-if="showColumn.phaseCVoltage" label="C相电压" align="center" width="90"/>
              </el-table-column>
              <el-table-column label="线电压(V)" align="center"
                               v-if="showColumn.lineAbVoltage||showColumn.lineBcVoltage||showColumn.lineCaVoltage">
                <el-table-column prop="lineAbVoltage" v-if="showColumn.lineAbVoltage" label="AB线电压" align="center" width="90"/>
                <el-table-column prop="lineBcVoltage" v-if="showColumn.lineBcVoltage" label="BC线电压" align="center" width="90"/>
                <el-table-column prop="lineCaVoltage" v-if="showColumn.lineCaVoltage" label="CA线电压" align="center" width="90"/>
              </el-table-column>
              <el-table-column label="电流(A)" align="center"
                               v-if="showColumn.phaseACurrent||showColumn.phaseBCurrent||showColumn.phaseCCurrent">
                <el-table-column prop="phaseACurrent" v-if="showColumn.phaseACurrent" label="A相电流" align="center" width="90"/>
                <el-table-column prop="phaseBCurrent" v-if="showColumn.phaseBCurrent" label="B相电流" align="center" width="90"/>
                <el-table-column prop="phaseCCurrent" v-if="showColumn.phaseCCurrent" label="C相电流" align="center" width="90"/>
              </el-table-column>
              <el-table-column label="有功功率(kw)" align="center"
                               v-if="showColumn.phaseAActivePower||showColumn.phaseBActivePower||showColumn.phaseBActivePower||showColumn.allActivePower">
                <el-table-column prop="phaseAActivePower" v-if="showColumn.phaseAActivePower" label="A相有功功率"
                                 align="center" width="90"/>
                <el-table-column prop="phaseBActivePower" v-if="showColumn.phaseBActivePower" label="B相有功功率"
                                 align="center" width="90"/>
                <el-table-column prop="phaseCActivePower" v-if="showColumn.phaseBActivePower" label="C相有功功率"
                                 align="center" width="90"/>
                <el-table-column prop="allActivePower" v-if="showColumn.allActivePower" label="总有功功率"
                                 align="center" width="90"/>
              </el-table-column>
              <el-table-column label="无功功率(kVAr)" align="center"
                               v-if="showColumn.phaseAReactivePower||showColumn.phaseBReactivePower||showColumn.phaseCReactivePower||showColumn.allReactivePower">
                <el-table-column prop="phaseAReactivePower" v-if="showColumn.phaseAReactivePower" label="A相无功功率"
                                 align="center" width="90"/>
                <el-table-column prop="phaseBReactivePower" v-if="showColumn.phaseBReactivePower" label="B相无功功率"
                                 align="center" width="90"/>
                <el-table-column prop="phaseCReactivePower" v-if="showColumn.phaseCReactivePower" label="C相无功功率"
                                 align="center" width="90"/>
                <el-table-column prop="allReactivePower" v-if="showColumn.allReactivePower" label="总无功功率"
                                 align="center" width="90"/>
              </el-table-column>
              <el-table-column label="视在功率(kVA)" align="center"
                               v-if="showColumn.phaseAApparentPower||showColumn.phaseBApparentPower||showColumn.phaseCApparentPower||showColumn.allApparentPower">
                <el-table-column prop="phaseAApparentPower" v-if="showColumn.phaseAApparentPower" label="A相视在功率"
                                 align="center" width="90"/>
                <el-table-column prop="phaseBApparentPower" v-if="showColumn.phaseBApparentPower" label="B相视在功率"
                                 align="center" width="90"/>
                <el-table-column prop="phaseCApparentPower" v-if="showColumn.phaseCApparentPower" label="C相视在功率"
                                 align="center" width="90"/>
                <el-table-column prop="allApparentPower" v-if="showColumn.allApparentPower" label="总视在功率"
                                 align="center" width="90"/>
              </el-table-column>
              <el-table-column label="功率因数" align="center"
                               v-if="showColumn.phaseAPowerFactor||showColumn.phaseBPowerFactor||showColumn.phaseCPowerFactor||showColumn.allPowerFactor">
                <el-table-column prop="phaseAPowerFactor" v-if="showColumn.phaseAPowerFactor" label="A相功率因数"
                                 align="center" width="90"/>
                <el-table-column prop="phaseBPowerFactor" v-if="showColumn.phaseBPowerFactor" label="B相功率因数"
                                 align="center" width="90"/>
                <el-table-column prop="phaseCPowerFactor" v-if="showColumn.phaseCPowerFactor" label="C相功率因数"
                                 align="center" width="90"/>
                <el-table-column prop="allPowerFactor" v-if="showColumn.allPowerFactor" label="总功率因数"
                                 align="center" width="90"/>
              </el-table-column>
              <el-table-column prop="frequency" label="频率(Hz)" v-if="showColumn.frequency"
                               align="center" width="90"/>
              <el-table-column prop="status" label="状态" align="center" width="90">
                <template #default="scope">
                  <span :style="scope.row.status === 1 ?'color:#a8ff55' : 'color:#ff4037'">{{ scope.row.status === 1 ? "正常" : "异常" }}</span>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </template>
        <template #header>
          <el-popover
              placement="bottom"
              trigger="click"
              class="elPopover"
              :visible="visible">
            <transition name="fade">
              <div class="elPopover">
                <div>选择显示字段</div>
                <div>
                  <el-checkbox v-model="showColumn.activeEnergyConsumption">正向有功使用量</el-checkbox>
                  <el-checkbox v-model="showColumn.activeEnergyTotal">正向有功累计值</el-checkbox>
                  <el-checkbox v-model="showColumn.reverseActiveEnergy">反向有功</el-checkbox>
                  <el-checkbox v-model="showColumn.inductiveReactivePower">感性无功</el-checkbox>
                  <el-checkbox v-model="showColumn.capacitiveReactivePower">容性无功</el-checkbox>
                  <el-checkbox v-model="showColumn.ctRatio">CT变比</el-checkbox>
                  <el-checkbox v-model="showColumn.ptRatio">PT变比</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseAVoltage">A相电压</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseBVoltage">B相电压</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseCVoltage">C相电压</el-checkbox>
                  <el-checkbox v-model="showColumn.lineAbVoltage">AB线电压</el-checkbox>
                  <el-checkbox v-model="showColumn.lineBcVoltage">BC线电压</el-checkbox>
                  <el-checkbox v-model="showColumn.lineCaVoltage">CA线电压</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseACurrent">A相电流</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseBCurrent">B相电流</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseCCurrent">C相电流</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseAReactivePower">A相无功功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseBReactivePower">B相无功功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseCReactivePower">C相无功功率</el-checkbox>
                  <el-checkbox v-model="showColumn.allReactivePower">总无功功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseAActivePower">A相有功功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseBActivePower">B相有功功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseCActivePower">C相有功功率</el-checkbox>
                  <el-checkbox v-model="showColumn.allActivePower">总有功功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseAApparentPower">A相视在功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseBApparentPower">B相视在功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseCApparentPower">C相视在功率</el-checkbox>
                  <el-checkbox v-model="showColumn.allApparentPower">总视在功率</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseAPowerFactor">A相功率因数</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseBPowerFactor">B相功率因数</el-checkbox>
                  <el-checkbox v-model="showColumn.phaseCPowerFactor">C相功率因数</el-checkbox>
                  <el-checkbox v-model="showColumn.allPowerFactor">总功率因数</el-checkbox>
                  <el-checkbox v-model="showColumn.frequency">频率</el-checkbox>
                </div>
              </div>
            </transition>
            <div style="text-align: right; margin: 0">
              <el-button size="mini" type="text" @click="visible = false">取消</el-button>
              <el-button size="mini" type="primary" plain @click="saveColumn">确定</el-button>
            </div>
            <template #reference>
              <svg-icon icon-class="set" class="setSvg" @click="visible = true"/>
            </template>
          </el-popover>
        </template>
      </el-table-column>
      <el-table-column prop="rangeName" label="统计点" align="center" :render-header="renderHeader"/>
      <el-table-column prop="rangeName" label="采集时间" align="center" :render-header="renderHeader"/>
      <el-table-column label="电量" align="center">
        <el-table-column prop="realActiveEnergyConsumption" label="总量(kw/h)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
            <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                             align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="直接量(kw/h)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="间接量(kw/h)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
      </el-table-column>

      <el-table-column label="水量" align="center">
        <el-table-column prop="realActiveEnergyConsumption" label="总量(t)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="直接量(t)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="间接量(t)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" :label="'人均使用量\n(t/人)'" :render-header="renderHeader"
                         align="center"/>
        <el-table-column prop="realActiveEnergyTotal" :label="'单位面积使用量\n(t/㎡)'" :render-header="renderHeader"
                         align="center"/>
      </el-table-column>

      <el-table-column label="热量" align="center">
        <el-table-column prop="realActiveEnergyConsumption" label="总量(KWh)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="直接量(KWh)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="间接量(KWh)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" :label="'人均使用量\n(KWh/人)'" :render-header="renderHeader"
                         align="center"/>
        <el-table-column prop="realActiveEnergyTotal" :label="'单位面积使用量\n(KWh/㎡)'" :render-header="renderHeader"
                         align="center"/>
      </el-table-column>


      <el-table-column label="换算热量" align="center">
        <el-table-column prop="realActiveEnergyConsumption" label="总量(KWh)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="直接量(KWh)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="间接量(KWh)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" :label="'人均使用量\n(KWh/人)'" :render-header="renderHeader"
                         align="center"/>
        <el-table-column prop="realActiveEnergyTotal" :label="'单位面积使用量\n(KWh/㎡)'" :render-header="renderHeader"
                         align="center"/>
      </el-table-column>


      <el-table-column label="流量" align="center">
        <el-table-column prop="realActiveEnergyConsumption" label="总量(m³)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="直接量(m³)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="间接量(m³)" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" :label="'人均使用量\n(m³/人)'" :render-header="renderHeader"
                         align="center"/>
        <el-table-column prop="realActiveEnergyTotal" :label="'单位面积使用量\n(m³/㎡)'" :render-header="renderHeader"
                         align="center"/>
      </el-table-column>


      <el-table-column label="当量时间" align="center">
        <el-table-column prop="realActiveEnergyConsumption" label="总量" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="直接量" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="间接量" :render-header="renderHeader"
                         align="center">
          <el-table-column prop="realActiveEnergyConsumption" label="累计值" :render-header="renderHeader"
                           align="center"/>
          <el-table-column prop="realActiveEnergyConsumption" label="使用量" :render-header="renderHeader"
                           align="center"/>
        </el-table-column>
        <el-table-column prop="realActiveEnergyTotal" label="人均使用量" :render-header="renderHeader"
                         align="center"/>
        <el-table-column prop="realActiveEnergyTotal" label="单位面积使用量" :render-header="renderHeader"
                         align="center"/>
      </el-table-column>

      <el-table-column prop="multiplier" label="备注" align="center" :render-header="renderHeader"></el-table-column>
    </el-table>
  </div>
</template>

<script>
import _ from "underscore";
import {h} from "vue";
import {setEchartsData} from '../../../utils/public'
let component;
import moment from 'moment';
import DateSwitchingComponent from "@/components/DateSwitchingComponent.vue";
import HistoricalDataEchartsPanel from "@/views/data/components/HistoricalDataEchartsPanel.vue";

export default {
  props:["localStorageName"],
  data() {
    return {
      showColumn: {
        activeEnergyConsumption: true,
        activeEnergyTotal: true,
        reverseActiveEnergy: true,
        inductiveReactivePower: true,
        capacitiveReactivePower: false,
        ctRatio: false,
        ptRatio: false,
        phaseAVoltage: false,
        phaseBVoltage: false,
        phaseCVoltage: false,
        lineAbVoltage: false,
        lineBcVoltage: false,
        lineCaVoltage: false,
        phaseACurrent: false,
        phaseBCurrent: false,
        phaseCCurrent: false,
        phaseAReactivePower: false,
        phaseBReactivePower: false,
        phaseCReactivePower: false,
        allReactivePower: false,
        phaseAActivePower: false,
        phaseBActivePower: false,
        phaseCActivePower: false,
        allActivePower: false,
        phaseAApparentPower: false,
        phaseBApparentPower: false,
        phaseCApparentPower: false,
        allApparentPower: false,
        phaseAPowerFactor: false,
        phaseBPowerFactor: false,
        phaseCPowerFactor: false,
        allPowerFactor: false,
        frequency: false
      },
      testData: '10',
      dataList: [],
      queryParams: {//所有关于子组件的传递参数都在此声明
        dateRange: [moment(), moment()],
        dateType: 'month'
      },
      visible: false,
      expands: [], // 只展开一行放入当前行id
      getRowKeys: (row) => { // 获取当前行id
        return row.deviceNo; // 这里看这一行中需要根据哪个属性值是id
      }
    };
  },
  components: {HistoricalDataEchartsPanel, DateSwitchingComponent},
  methods: {
    renderHeader({column}) {
      let realWidth = 0;
      let span = document.createElement('span');

      span.innerText = column.label;
      document.body.appendChild(span);

      realWidth = span.getBoundingClientRect().width;
      column.minWidth = realWidth + 40; // 可能还有边距/边框等值，需要根据实际情况加上

      document.body.removeChild(span);
      return h('span', column.label);
    },
    expandColumn(row, expandedRows) {

      // 每次只展开一行
      if (expandedRows.length) {
        component.expands = []
        if (row) {
          component.expands.push(row.deviceNo);
          component.showChartsData = row.chart;
          setEchartsData(component);
        }
      } else {
        component.expands = []
      }
    },
    saveColumn() {
      //持久化存储
      localStorage.setItem(component.localStorageName, JSON.stringify(this.showColumn))
      this.visible = false;
      if (component.expands.length == 0) return;
      setEchartsData(component);
    },
    getData(date, type) {
      this.queryParams.dateRange = date;
      this.queryParams.dateType = type;
      this.$emit('getData');//调用父级组件的actionQuery
    }
  },
  mounted() {
    component = this;
    if (localStorage.getItem(component.localStorageName)) {
      this.showColumn = JSON.parse(localStorage.getItem(component.localStorageName))
    } else {
      this.showColumn = {
        activeEnergyConsumption: true,
        activeEnergyTotal: true,
        reverseActiveEnergy: true,
        inductiveReactivePower: true,
        capacitiveReactivePower: false,
        ctRatio: false,
        ptRatio: false,
        phaseAVoltage: false,
        phaseBVoltage: false,
        phaseCVoltage: false,
        lineAbVoltage: false,
        lineBcVoltage: false,
        lineCaVoltage: false,
        phaseACurrent: false,
        phaseBCurrent: false,
        phaseCCurrent: false,
        phaseAReactivePower: false,
        phaseBReactivePower: false,
        phaseCReactivePower: false,
        allReactivePower: false,
        phaseAActivePower: false,
        phaseBActivePower: false,
        phaseCActivePower: false,
        allActivePower: false,
        phaseAApparentPower: false,
        phaseBApparentPower: false,
        phaseCApparentPower: false,
        allApparentPower: false,
        phaseAPowerFactor: false,
        phaseBPowerFactor: false,
        phaseCPowerFactor: false,
        allPowerFactor: false,
        frequency: false
      };
    }
  }
}

</script>
<style lang='scss'>
.statisticsTableView {
  width: 100%;
  height: 560px;
}
</style>